package com.lab.action;

import java.io.IOException;

import com.lab.pojo.Gsmmodem;
import com.lab.pojo.Users;
import com.lab.service.GsmmodemService;
import com.lab.util.Const;

public class GsmmodemAction extends BaseAction {
	public GsmmodemService gsmmodemService;

	public void setGsmmodemService(GsmmodemService gsmmodemService) {
		this.gsmmodemService = gsmmodemService;
	}

	
	public String saveGsmmodem() throws IOException{
		Gsmmodem gsmmodem = new Gsmmodem(mobileNumber,serialPortAddress,remark);
		String result = gsmmodemService.saveGsmmodem(gsmmodem);
		if(result.equals(Const.SUCCESS)){
			response.setCharacterEncoding("UTF-8");
			out = response.getWriter();
			out.write("保存成功");
			//out.println(Const.SUCCESS);
			out.flush();
			out.close();
		}else{
			
		}
		
		return null;
	}
	
	private Integer id;
	private String mobileNumber;
	private String serialPortAddress;
	private String remark;

	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getMobileNumber() {
		return mobileNumber;
	}


	public void setMobileNumber(String mobileNumber) {
		this.mobileNumber = mobileNumber;
	}


	public String getSerialPortAddress() {
		return serialPortAddress;
	}


	public void setSerialPortAddress(String serialPortAddress) {
		this.serialPortAddress = serialPortAddress;
	}


	public String getRemark() {
		return remark;
	}


	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
}
